package com.aztec.ims.service.dao;

import java.util.ArrayList;
import java.util.List;

import com.aztec.ims.domain.Address;
import com.aztec.ims.domain.VendorContact;
import com.aztec.ims.service.request.CreateVendorRequest;
import com.aztec.ims.service.response.CreateVendorResponse;


public class TestVendorDetailsDao {
	public static void main(String[] args) {

		VendorDetailsDao dao = new VendorDetailsDao();
		
		CreateVendorRequest request = new CreateVendorRequest();
		request.setVendorName("aztec");
		request.setActiveFlag(true);
		request.setRemarks("test remarks");
		request.setCarrier("3");
		request.setPaymentTerms("1");
		request.setTaxingScheme("1");
		
		VendorContact vc = new VendorContact();
		vc.setContactEmail("deepakmenon@ymail.com");
		vc.setContactFax("9976013937");
		vc.setContactName("Deepak Menon");
		vc.setContactPhone("9847260566");
		vc.setContactWebsite("www.deepakmenon.com");
		request.setVendorCOntact(vc);
		
		List list = new ArrayList();
		Address address = new Address();
		address.setAddressName("Business Address");
		address.setAddressType("R");
		address.setCity("Chennai");
		address.setCountry("India");
		address.setRemarks("test remarks");
		address.setState("Tamil Nadu");
		address.setStreet("4th Avenue");
		address.setZipCode("600042");
		list.add(address);

		Address address1 = new Address();
		address1.setAddressName("Home Address");
		address1.setAddressType("B");
		address1.setCity("Kochi");
		address1.setCountry("India");
		address1.setRemarks("test remarks home");
		address1.setState("Kerala");
		address1.setStreet("temple road");
		address1.setZipCode("987067");
		list.add(address1);
		
		
		request.setVendorAddress(list);
		
		CreateVendorResponse response = dao.createVendor(request);
		
		System.out.println("*****"+response.getVendorId()+"******");
		
		
	}

}
